package co.fitstart.entity.course;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

import com.demo2do.core.format.PersistentFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;


/**
 * 
 * @author LZJ
 *
 */

@Entity
@Table(name = "sms_black_list")
@DynamicUpdate
@PersistentFormat
@JsonIgnoreProperties(value={"hibernate_lazy_initializer","handler","fieldHandler"})
public class SmsBlackList {
	
	
	 @Id
	    @GeneratedValue
	    private Long id;
	    
	    /** 手机号 */
	    private String mobile;
	    
	    /*** 是否加入黑名单  */	     
	    @Column(name = "is_disabled")
	    private boolean disabled;
	    	    
	    
	    

		public SmsBlackList() {
			
		}

		/**
		 * 是否添加黑名单
		 * @param value
		 * @return
		 */
		public SmsBlackList isNeedBlackList (boolean value) {
			
			this.disabled = value;			
			return this;
			
		}
		
		/**
		 * 添加手机到黑名单中
		 * @param mobile
		 * @return
		 */
		public SmsBlackList addMobileInBlackList(String mobile) {			

			this.mobile = mobile;
			
			return this;
			
		}
		
		
		
		public Long getId() {
			return id;
		}


		public void setId(Long id) {
			this.id = id;
		}


		public String getMobile() {
			return mobile;
		}


		public void setMobile(String mobile) {
			this.mobile = mobile;
		}


		public boolean isDisabled() {
			return disabled;
		}


		public void setDisabled(boolean disabled) {
			this.disabled = disabled;
		}
	    
	    
	    

}
